
<link rel="stylesheet" type="text/css" href="/public/store/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/public/store/daterangepicker-bs3.css">
<ol class="breadcrumb">
    <li><a href="/store">KTV管理</a></li>
    <li class="active"><a href="/store/goodsMoneyTJ">财务统计</a></li>
</ol>
<!-- seat end -->
<div class="row">
    <div class="container-fluid">
        
    </div>
    <!-- rightcont end -->
</div>
<script type="text/html" id="list_tmpl">
    <form method="get" action="goodsMoneyTJList" class="memberbox grid">
        <div class="shai">筛选条件：</div>
        <div class="g-col form-inline">
            <input type="text" name="startTime" class="form-control datetime" size="21" placeholder="开始时间" value="{{startTime}}" />
            至
            <input type="text" name="endTime" class="form-control datetime" size="21" placeholder="结束时间" value="{{endTime}}" />
            <input type="hidden" name="shopId" class="form-control"  value="{{shopId}}" />
            <span class="blue daterang hand" data-day="6">最近7天</span>
            <span class="blue daterang hand" data-day="29">最近30天</span>
            <div class="grid middle" style="padding-top:16px;">
                <div class="g-col">
                    <div id="search" class="btn gn_btn search">筛选</div>
                    <button type="submit" class="btn gn_btn black_btn explode" formaction="goodsMoneyTJExcel">导出</button>
                    <button type="button" class="btn gn_btn black_btn print">打印</button>
                </div>
            </div>
        </div>
    </form>
    <div class="container-fluid fromhead" style="line-height:1.8em">
        <p>筛选出：共计 <span class="red">{{totalRoom}}</span> 个包厢， <span class="red">{{totalOrder}}</span> 笔订单，累计消费<span class="red">{{totalMoney}}</span>,其中：
            <br/>
            微信支付：<span class="red">{{totalWxMoney}}</span>，
            会员支付：<span class="red">{{totalHyMoney}}</span>，
            收款码支付：<span class="red">{{totalSkmMoney}}</span>，
            POS机支付：<span class="red">{{totalPosMoney}}</span>，
            现金支付：<span class="red">{{totalCashMoney}}</span>，
            支付宝支付：<span class="red">{{totalAlpayMoney}}</span>,
            未知支付：<span class="red">{{unknowMoney}}</span>,
        </p>
        <p>此时间段
            充值：<span class="red">{{cz}}</span>，
            积分兑换：<span class="red">{{jf}}</span> ，
            优惠券低值：<span class="red">{{totalCoupon}}</span> ，
            抹零总额：<span class="red">{{totalDiscount}}</span> ，
            退款金额：<span class="red">{{refundMoney}}</span>
        </p>
    </div>
    <table class="table table-bordered from_table">
        <tr>
            <th class="text-center">序号</th>
            <th class="text-center">包厢号</th>
            <th class="text-center">订单数量</th>
            <th class="text-center">实收金额</th>
            <th class="text-center">优惠券低值</th>
            <th class="text-center">抹零</th>
            <!--<th class="text-center">微信支付</th>-->
            <!--<th class="text-center">会员支付</th>-->
            <th class="text-center">积分兑换</th>
            <!--<th class="text-center">退单</th>-->
            <th class="text-center">操作</th>
        </tr>
        {{each tj as li i}}
        <tr>
            <td class="text-center">{{i+1}}</td>
            <td class="text-center">{{li.roomId}}</td>
            <td class="text-center">{{li.count}}</td>
            <td class="text-center">{{li.Money}}</td>
            <td class="text-center">{{li.coupon}}</td>
            <td class="text-center">{{li.discount}}</td>
            <!--<td class="text-center">{{li.wxMoney}}</td>-->
            <!--<td class="text-center">{{li.hyMoney}}</td>-->
            <td class="text-center">{{li.jf}}</td>
            <!--<td class="text-center">{{li.refundMoney}}</td>-->
            <td class="text-center blue hand xqing" data-i="{{i}}">详情</td>
        </tr>
        {{/each}}
    </table>
    {{if totalPage>1}}
    <nav class="text-right">
        <ul class="pagination">
            {{if pageNumber>1}}
            <li>
                <a href="?startTime={{startTime}}&endTime={{endTime}}&pi={{pageNumber-1}}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
            {{/if}}
            {{for var i = pageNumber-5; i < pageNumber + 5; i++}}
            {{if i>0 && i <= totalPage}}
            <li{{if i == pageNumber}} class="active"{{/if}}><a href="?startTime={{startTime}}&endTime={{endTime}}&pi={{i}}">{{i}}</a></li>
            {{/if}}
            {{/for}}
            {{if pageNumber<totalPage}}
            <li>
                <a href="?startTime={{startTime}}&endTime={{endTime}}&pi={{pageNumber+1}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </li>
            {{/if}}
        </ul>
    </nav>
    {{/if}}
</script>

<script type="text/html" id="order_tmpl">
    <p>订单数量：<span class="red">{{totalOrder}}</span> 笔  累计收款：<span class="red">{{totalMoney}}</span>
        （
            其中微信支付：<span class="red">{{totalWxMoney}}</span>
            会员支付：<span class="red">{{totalHyMoney}}</span>
            收款码支付：<span class="red">{{totalSkmMoney}}</span>
            POS机支付：<span class="red">{{totalPosMoney}}</span>
            现金支付：<span class="red">{{totalCashMoney}}</span>
            支付宝支付：<span class="red">{{totalAlpayMoney}}</span>
    ） </p>
    <p style="text-indent:5em;">
        积分兑换：<span class="red">{{jf}}</span>，
        优惠券低值：<span class="red">{{totalCoupon}}</span> ，
        抹零总额：<span class="red">{{totalDiscount}}</span> ，
        退款金额：<span class="red">{{refundMoney}}</span>，
    </p>
    <table class="table table-bordered from_table">
        <tr>
            <th class="text-center">序号</th>
            <th class="text-center">订单编号</th>
            <th class="text-center">实付金额</th>
            <th class="text-center">优惠券低值</th>
            <th class="text-center">抹零</th>
            <th class="text-center">支付方式</th>
            <th class="text-center">积分兑换</th>
            <!--<th class="text-center">退单</th>-->
            <th class="text-center">下单时间</th>
        </tr>
        {{each tj as li i}}
        <tr>
            <td class="text-center">{{i+1}}</td>
            <td class="text-center blue hand chakan" data-i="{{i}}">{{li.orderNo}}</td>
            <td class="text-center">{{li.Money}}</td>
            <td class="text-center">{{li.coupon}}</td>
            <td class="text-center">{{li.discount}}</td>
            <td class="text-center">{{li.payType}}</td>
            <td class="text-center">{{li.jf}}</td>
            <!--<td class="text-center">{{li.refundMoney}}</td>-->
            <td class="text-center">{{li.createdTime}}</td>
        </tr>
        {{/each}}
    </table>
</script>

<script type="text/html" id="order_goods_tmpl">
    <table class="table table-bordered from_table">
        <tr>
            <th class="text-center" nowrap>序号</th>
            <th class="text-center" nowrap>商品名称</th>
            <th class="text-center" nowrap>商品图片</th>
            <th class="text-center" nowrap>数量</th>
            {{if isScore}}
            <th class="text-center" nowrap>积分</th>
            <th class="text-center" nowrap>小计</th>
            {{else}}
            <th class="text-center" nowrap>单价</th>
            <th class="text-center" nowrap>金额</th>
            {{/if}}
        </tr>
        {{each list as vo i}}
        <tr{{if vo.goodsState<1}} class="unline"{{/if}}>
            <td class="text-center">{{i+1}}</td>
            <td class="text-center">{{vo.goodsName}}</td>
            <td class="text-center"><img src="{{vo.goodsLogo}}" style="max-height:100px;" /></td>
            <td class="text-center">{{vo.goodsCount}}</td>
            {{if isScore}}
            <td class="text-center">{{vo.goodsScore}}</td>
            <td class="text-center">{{vo.goodsCount*vo.goodsScore}}</td>
            {{else}}
            <td class="text-center">￥{{if vo.isMemberPrice}}{{vo.goodsMemberPrice/100}}{{else}}{{vo.goodsCommonPrice/100}}{{/if}}</td>
            <td class="text-center">￥{{if vo.isMemberPrice}}{{vo.goodsMemberPrice*vo.goodsCount/100}}{{else}}{{vo.goodsCommonPrice*vo.goodsCount/100}}{{/if}}</td>
            {{/if}}
        </tr>
        {{/each}}
    </table>
</script>

<script type="text/html" id="checkPassword">
        <input class="form-control">
</script>

    <!--引入插件js代码-->
<script src="/public/store/moment.js"></script>
<script src="/public/store/daterangepicker.js"></script>